export const iGetInnerText = (testStr) => {
  let resultStr = testStr.replace(/\\ +/g, '') // 去掉空格
  resultStr = testStr.replace(/[ ]/g, '') // 去掉空格
  resultStr = testStr.replace(/[\r\n]/g, '') // 去掉回车换行
  return resultStr
}
/**
 * 存储localStorage
 */
export const setStore = (name, content) => {
  if (!name) return
  if (typeof content !== 'string') {
    content = JSON.stringify(content)
  }
  wx.setStorageSync(name, content)
}

/**
 * 获取localStorage
 */
export const getStore = name => {
  if (!name) return
  return wx.getStorageSync(name)
}

/**
 * 删除localStorage
 */
export const removeStore = name => {
  if (!name) return
  wx.removeStorageSync(name)
}
